#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

void *my_memcpy(void* dest, const void* src, size_t size)
{
	void* ret = dest;
	while (size--)
	{
		*(char*)dest = *(char*)src;
		dest = (char*)dest + 1;
		src = (char*)src + 1;
	}
	return ret;
}

int main()
{
	int a[10] = { 1,2,3,4,5,6,7,8,9,10 };
	my_memcpy(a+2, a, 20);
	for(int i=0;i<10;i++)
		printf("%d ", a[i]);
	return 0;
}
